const test = {
    //属性
    state: {
        name: '我是name',
        value: '我是value'
    },
    //同步方法
    mutations: {
        SET_NAME: (state, name) => {
            state.name = name
        },
        SET_VALUE: (state, value) => {
            state.value = value
        }
    },
    //异步方法
    actions: {
        setName({commit, name}) {
            commit('SET_NAME', name);
        },
        setValue({commit, value}) {
            commit('SET_NAME', value);
        },
    }
}

export default test
